package com.siwei.mes.controller.system;

import com.siwei.mes.common.annotation.AnonymousAccess;
import com.siwei.mes.common.result.Json;
import com.siwei.mes.service.system.JavaVersionService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * 后端版本号相关
 *
 * @author linzi
 * @since 2025-09-09 22:15:29
 */
@Api(value = "后端版本号")
@RestController
@RequestMapping("javaVersion")
class JavaVersionController {
    @Resource
    private JavaVersionService javaVersionService;

    @AnonymousAccess
    @ApiOperation(value = "获取最新版本号")
    @GetMapping("/getLastVersion")
    public Json getLastVersion() {
        return Json.succ().data(javaVersionService.getLastVersion());
    }
}
